package compilador;

import java.io.FileReader;

public class Compilador {

    public Compilador() {
    }
        
    public void iniciarCompilacao(String caminho) {
        try {
            FileReader reader = new FileReader(caminho);
            Scanner scanner = new Scanner(reader);
            Parser p = new Parser(scanner);
            java_cup.runtime.Symbol parse_tree = p.parse();
        } catch (Exception e) {
            System.out.println("erro:" + e.getMessage());
        }
    }

    public static void main(String[] args) {
        try {
            Parser p = new Parser(new Scanner(new FileReader("c://mili//teste.mili")));
            java_cup.runtime.Symbol parse_tree = p.parse();
        } catch (Exception e) {
            System.out.println("erro:" + e.getMessage());
        }
    }

}
